home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 13672 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news-feed.iguide.com!usenet
  2. From: tdowney@delphi.com (Tim Downey)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: making #define's to be seen across files
  5. Date: 9 Apr 1996 18:57:12 GMT
  6. Organization: News Corporation
  7. Message-ID: <4kebu8$7h5@klein.iguide.com>
  8. References: <1996Apr9.164443.28709@relay.nswc.navy.mil>
  9. NNTP-Posting-Host: nutbrown.delphi.com
  10. X-Newsreader: knews 0.9.6
  11. In-Reply-To: <1996Apr9.164443.28709@relay.nswc.navy.mil>
  12. To: dheffel@vitds2.nswc.navy.mil (David R. Heffelfinger)
  13.  
  14. In article <1996Apr9.164443.28709@relay.nswc.navy.mil>,
  15.     dheffel@vitds2.nswc.navy.mil (David R. Heffelfinger) writes:
  16. >Hi there,
  17. >    There is (hopefully) a simple answer to my question:
  18. >
  19. >I have some C code divided into different source files.
  20. >When I try to compile using 
  21. >  "cc file1.c file2.c file3.c"
  22. >the constants #define'd in file1.c are not visible in file2.c, is there a way to make them visible to the other source files?  In other words, is there som equivalent to "extern" for constants?
  23. >
  24.  
  25. Put them in a header file and include the header file in both file1.c and
  26. file2.c
  27.  
  28. -tim
  29.  
  30. -- 
  31. ##########################################################################
  32. Tim Downey                        tdowney@delphi.com
  33. NewsCorp Internet Technologies            tdowney@twotone.delphi.com
  34. 900 Chelmsford Street                         (508)551-1125
  35. Lowell, MA 01851
  36.  
  37.  
  38.